<div class="jumbotron">
    <h1>兑奖中心</h1>
    <p></p>
    <p></p>
    <div class="clearfix" style="margin-bottom: 22px;">
        <div class="col-sm-4" style="padding-left: 0;">
            <input type="text" class="form-control col-sm-4" ng-model="code" placeholder="请输入兑换码">
        </div>
    </div>
    <p><a class="btn btn-primary btn-lg" ng-click="exchange()" ng-disabled="!code" role="button">点击查看中奖信息</a></p>
</div>

<div class="panel panel-default" ng-show="flag">
    <div class="panel-heading">中奖信息
        <button class="btn btn-primary btn-sm" ng-click="flag = !flag">清除</button>
    </div>
    <div class="panel-body">
        <div class="" ng-show="dataList.length==0">对不起，兑奖码不正确。</div>
        <table class="table table-striped table-bordered table-hover" ng-show="dataList.length>0">
            <thead>
            <tr>
                <th>奖品类型</th>
                <th>奖品说明</th>
                <th>是否已经兑换</th>
                <th>微信名</th>
                <th>国家</th>
                <th>省份</th>
                <th>城市</th>
                <th>性别</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="data in dataList">
                <td ng-bind="data.prize.title" title="{{data.prize.title}}"></td>
                <td ng-bind="data.prize.description" title="{{data.prize.description}}"></td>
                <td ng-bind="data.hasGet | Exchange" title="{{data.hasGet | Exchange}}"></td>
                <td ng-bind="data.follower.nickname" title="{{data.follower.nickname}}"></td>
                <td ng-bind="data.follower.country" title="{{data.follower.country}}"></td>
                <td ng-bind="data.follower.province" title="{{data.follower.province}}"></td>
                <td ng-bind="data.follower.city" title="{{data.follower.city}}"></td>
                <td ng-bind="data.follower.sex" title="{{data.follower.sex}}"></td>
                <td>
                    <button type="button" class="btn btn-primary btn-xs" ng-show="!data.hasGet"
                            ng-click="exchangeTrue(data.voteId,data.followerId)" ng-disabled="data.hasGet">兑换
                    </button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>